<?php declare(strict_types=1);

namespace App\Dao;

use App\Model\File;

/**
 * Class FileDao
 * @package App\Dao
 */
class FileDao extends BaseDao
{

    /**
     * 添加一条数据
     * @param $params
     * @return File
     */
    public function save($model, $params):File
    {
        return $this->saveOne($model, $params);
    }

    /**
     * 插入一条数据
     * @param $params
     * @return File
     */
    public function insert($params):File
    {
        $params['deleted_at'] = 0;
        return $this->saveOne((new File()), $params);
    }

}